<?php if(!defined("HDPHP_PATH"))exit;C("SHOW_WARNING",false);?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>商品栏目</title>
    <link rel="stylesheet" href="http://localhost/ly/shop/APP/admin/Tpl/GoodsAttr/css/index.css">
    <script type='text/javascript' src='http://localhost/ly/HDPHP/hdphp/Extend/Org/Jquery/jquery-1.8.2.min.js'></script>
    <script  type="text/javascript">
        $(function(){
            $(document).ready(function(){
                $("#right .art-lisi table tbody tr").removeClass("row_bg");
                $("#right .art-lisi table tbody tr:even").addClass("row_bg");
            })            
        })
    </script>

</head>
<body>
    <div id="admin">                     
        <div id="right">
            <div class="M-articless">
                <div class="top_box">
                    <h3>商品属性</h3>
                    <a class="add" href="<?php echo U('add','gt_id='.$_GET['gt_id']);?>" target="content" title='添加属性'></a>
                </div>
                <div class="art-lisi">
                    <!-- <div class="forMsg">操作成功信息</div> -->
                    <table>
                        <thead>
                            <tr>
                                <th style="width:80px">属性ID</th>
                                <th>属性名称</th> 
                                <th>属性类型</th>                                   
                                <th  style="width:90px">操作</th>
                            </tr>
                        </thead> 

                        <tbody>
                            <?php $hd["list"]["f"]["total"]=0;if(isset($field) && !empty($field)):$_id_f=0;$_index_f=0;$lastf=min(1000,count($field));
$hd["list"]["f"]["first"]=true;
$hd["list"]["f"]["last"]=false;
$_total_f=ceil($lastf/1);$hd["list"]["f"]["total"]=$_total_f;
$_data_f = array_slice($field,0,$lastf);
if(count($_data_f)==0):echo "";
else:
foreach($_data_f as $key=>$f):
if(($_id_f)%1==0):$_id_f++;else:$_id_f++;continue;endif;
$hd["list"]["f"]["index"]=++$_index_f;
if($_index_f>=$_total_f):$hd["list"]["f"]["last"]=true;endif;?>

                                <tr>
                                    <td><?php echo $f['ac_id'];?></td>                                   
                                    <td><?php echo $f['attr_name'];?></td>
                                    <td>
                                        <?php if($f['is_spec']==1){?>规格属性
                                            <?php  }else{ ?>普通属性
                                        <?php }?>
                                    </td>
                                    <td class="caozuo">                                        
                                        <a href="<?php echo U('edit',array('ac_id'=>$f['ac_id']));?>">编辑</a> 
                                        | 
                                        <a href="<?php echo U('del',array('ac_id'=>$f['ac_id']));?>">删除</a>
                                    </td>
                                </tr>
                            <?php $hd["list"]["f"]["first"]=false;
endforeach;
endif;
else:
echo "";
endif;?>
                        </tbody> 

                        <tfoot>
                            <tr>
                                <td colspan="6">
                                    <div class="page">
                                        <a class="pg" title="Previous Page" href="?c=blog&m=pre">« Previous</a>
                                        <?php echo $page;?>
                                        <a class="pg" title="Next" href="?c=blog&m=next">Next »</a>
                                    </div>
                                </td>
                            </tr>
                        </tfoot>  
                    </table>
                </div>
            </div>
        </div>
        
    </div>
</body>
</html>